package cn.tedu.imop.basic.service.impl;

import cn.tedu.imop.common.pojo.PageData;
import cn.tedu.imop.basic.dao.repository.BusinessCategoryRepository;
import cn.tedu.imop.basic.entity.BusinessCategory;
import cn.tedu.imop.basic.service.BusinessCategoryService;
import org.springframework.stereotype.Service;

@Service
public class BussinessCategoryServiceImpl implements BusinessCategoryService {
    private final BusinessCategoryRepository bussinessCategoryRepository;
    public BussinessCategoryServiceImpl(BusinessCategoryRepository bussinessCategoryRepository){
        this.bussinessCategoryRepository = bussinessCategoryRepository;
    }
    @Override
    public PageData<BusinessCategory> getBusinessCategoryList(BusinessCategory category) {
        return bussinessCategoryRepository.selectBusinessCategoryList(category);
    }

    @Override
    public Boolean createBusinessCategory(BusinessCategory category) {
         bussinessCategoryRepository.insertBusinessCategory(category);
         return true;
    }
}
